home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Prog
/
T
/
TC Prog Guide.cpt
/
picture ƒ
/
segment.h
< prev
next >
Wrap
Text File
|
1991-02-16
|
1KB
|
47 lines
/*
* FILE: segment.h
* AUTHOR: R. Gonzalez
* CREATED: October 2, 1990
*
* Defines general-purpose segment and nested segments for picture
* application. All graphics figures descend from Segment.
*/
# ifndef segment_h
# define segment_h
# include "class.h"
# include "trans.h"
# include "camera.h"
# include "project.h"
# include "color.h"
# define MAX_SEGMENTS 50
/******************************************************************
* abstract segment
******************************************************************/
struct Segment:Generic_Class
{
virtual void set_color(color);
virtual void draw(Camera*,Projector*,Transformation*);
virtual void move(Transformation*);
};
/******************************************************************
* abstract nested segment
******************************************************************/
struct Nested_Segment:Segment
{
Transformation *transformation;
Segment *segment[MAX_SEGMENTS];
int num_segments;
boolean init(void);
void set_color(color);
void draw(Camera*,Projector*,Transformation*);
void move(Transformation*);
boolean destroy(void);
};
# endif